package 实践.class_04;

public class Demo_02 {
}
class Student1 {
    private String name;
    private int age;
    private String id;
    private int score1;
    private int score2;
    private int score3;
    private int score4;

    public Student1(String name, int age, String id, int score1, int score2, int score3, int score4) {
        this.name = name;
        this.age = age;
        this.id = id;
        this.score1 = score1;
        this.score2 = score2;
        this.score3 = score3;this.score4 = score4;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public String getID() {
        return id;
    }

    public int getAverage() {
        return (score1 + score2 + score3 + score4) / 4;
    }
}
